package com.ulic.customerManApplication.commonmodule.bo;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.ulic.customerManApplication.usermodule.bo.User;

@Entity
@Table(name="T_GYW_BIRTHDAYMESSAGE")
@SequenceGenerator(name="birthdaymessage_seq",sequenceName="S_GYW_BIRMESSAGE_ID")
public class BirthdayMessage implements Serializable{

	/**
	 * 生日祝福信息
	 */
	private static final long serialVersionUID = 1L;
	private int id;//编号
	private String message;//祝福语
	private String type;//类型:邮件，手机
	private User user;//所属用户
	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="birthdaymessage_seq")
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY, optional = false)   
    @JoinColumn(name="UM_USER_ID")
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
}
